home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 2000 November: Tool Chest / Dev.CD Nov 00 TC Disk 1.toast / Sample Code / Devices and Hardware / SCSI / SCSI Simple Sample / MakeFile next >
Encoding:
Makefile  |  2000-09-28  |  4.5 KB  |  180 lines  |  [TEXT/MPS ]

  1. #
  2. # SCSI Simple Sample
  3. # Copyright © 1993-94, Apple Computer Inc.
  4. # All rights reserved.
  5. #
  6. # Note: this requires the Macintosh on Risc Toolkit. It builds
  7. # a "fat" binary that runs native on both PowerMacintosh and on
  8. # the Motorolo 680x0 processors.
  9. #
  10. # NOTE: as of this writing, the Power Mac headers do not support
  11. # the _SCSIAtomic trap. The PPCC part of the build will therefore
  12. # fail. The program does, however, run on Power Mac in emulation.
  13. #
  14. #
  15. Src                    =    ":Src:"
  16. Obj                    =    ":Obj:"
  17. M68Objects                =                    ∂
  18.         {Obj}DoGetDriveInfo.c.mo            ∂
  19.         {Obj}DoListSCSIDevices.c.mo            ∂
  20.         {Obj}DoReadBlockZero.c.mo            ∂
  21.         {Obj}DoTestUnitReady.c.mo            ∂
  22.         {Obj}SCSISimpleSampleDisplay.c.mo    ∂
  23.         {Obj}SCSISimpleSampleMain.c.mo        ∂
  24.         {Obj}AsyncSCSI.c.mo                    ∂
  25.         {Obj}AsyncSCSIPresent.c.mo            ∂
  26.         {Obj}DoSCSICommandWithSense.c.mo    ∂
  27.         {Obj}OriginalSCSI.c.mo                ∂
  28.         {Obj}SCSIBusAPI.c.mo                ∂
  29.         {Obj}SCSICheckForDevicePresent.c.mo    ∂
  30.         {Obj}SCSIGetCommandLength.c.mo        ∂
  31.         {Obj}SCSIGetHighHostBusAdaptor.c.mo    ∂
  32.         {Obj}SCSIGetInitiatorID.c.mo        ∂
  33.         {Obj}SCSIGetMaxTargetID.c.mo        ∂
  34.         {Obj}LogManager.c.mo                ∂
  35.         {Obj}StringFormat.c.mo                ∂
  36.         {Obj}WindowUtilities.c.mo
  37.  
  38. PPCObjects                =                    ∂
  39.         {Obj}DoGetDriveInfo.c.po            ∂
  40.         {Obj}DoListSCSIDevices.c.po            ∂
  41.         {Obj}DoReadBlockZero.c.po            ∂
  42.         {Obj}DoTestUnitReady.c.po            ∂
  43.         {Obj}SCSISimpleSampleDisplay.c.po    ∂
  44.         {Obj}SCSISimpleSampleMain.c.po        ∂
  45.         {Obj}AsyncSCSI.c.po                    ∂
  46.         {Obj}AsyncSCSIPresent.c.po            ∂
  47.         {Obj}DoSCSICommandWithSense.c.po    ∂
  48.         {Obj}OriginalSCSI.c.po                ∂
  49.         {Obj}SCSIBusAPI.c.po                ∂
  50.         {Obj}SCSICheckForDevicePresent.c.po    ∂
  51.         {Obj}SCSIGetCommandLength.c.po        ∂
  52.         {Obj}SCSIGetHighHostBusAdaptor.c.po    ∂
  53.         {Obj}SCSIGetInitiatorID.c.po        ∂
  54.         {Obj}SCSIGetMaxTargetID.c.po        ∂
  55.         {Obj}LogManager.c.po                ∂
  56.         {Obj}StringFormat.c.po                ∂
  57.         {Obj}WindowUtilities.c.po
  58.  
  59.  
  60. #
  61. # Directory dependencies. "Everything in the {Obj} directory depends on something
  62. # in the {Src} directory." Note: you can throw away the contents of the {Obj}
  63. # directory if you want to rebuild from scratch.
  64. #
  65. {Obj}            ƒ    {Src}
  66.  
  67. #
  68. # Compiler dependencies -- common to all compilations The idea here is that all
  69. # sources are stored in the {Src} subdirectory, and all objects and code resources
  70. # output by the linker or Rez are stored in the {Obj} subdirectory.
  71. #
  72. .c.mo ƒ .c                                    ∂
  73.         {Src}SCSI.h                            ∂
  74.         {Src}LogManager.h                    ∂
  75.         {Src}MacSCSICommand.h                ∂
  76.         {Src}SCSISimpleSample.h
  77.     C {COptions}                            ∂
  78.         -o {TargDir}{Default}.c.mo            ∂
  79.         {DepDir}{Default}.c
  80.  
  81. .c.po ƒ .c                                    ∂
  82.         {Src}SCSI.h                            ∂
  83.         {Src}LogManager.h                    ∂
  84.         {Src}MacSCSICommand.h                ∂
  85.         {Src}SCSISimpleSample.h
  86.     PPCC -sym on -appleext on -w off -d MPW    ∂
  87.         -o {TargDir}{Default}.c.po            ∂
  88.         {DepDir}{Default}.c
  89.  
  90. #
  91. # Build the MetroWerks resources
  92. #
  93. MetroWerks ƒ                                ∂
  94.     "SCSISimpleSample.µ.rsrc"
  95.         echo "MetroWerks resources created"
  96.  
  97. #
  98. # Build the application.
  99. #
  100. "SCSI Simple Sample MPW" ƒƒ                    ∂
  101.         MakeFile                            ∂
  102.         SCSISimpleSample.µ.rsrc                ∂
  103.         {Src}SCSISimpleSample.h                ∂
  104.         {Src}SCSISimpleSample.r
  105.     Rez                                        ∂
  106.         {Src}SCSISimpleSample.r                ∂
  107.         -append                                ∂
  108.         -t APPL                                ∂
  109.         -i "{CIncludes}"                    ∂
  110.         -i "{RIncludes}"                    ∂
  111.         -o {targ}
  112.  
  113. "SCSI Simple Sample MPW" ƒƒ                    ∂
  114.         MakeFile                            ∂
  115.         {M68Objects}
  116.     Link                                    ∂
  117.         -t APPL                                ∂
  118.         {M68Objects}                        ∂
  119.         "{Libraries}"Runtime.o                ∂
  120.         "{Libraries}"Interface.o            ∂
  121.         -o {targ}
  122.  
  123. #
  124. # This builds a project resource file for the
  125. # Metrowerks DR3 environment. It is also
  126. # available as a stand-alone Makefile.
  127. #
  128. "SCSISimpleSample.µ.rsrc" ƒ                    ∂
  129.         MakeFile                            ∂
  130.         {Src}SCSISimpleSample.r
  131.     Rez                                        ∂
  132.         {Src}SCSISimpleSample.r                ∂
  133.         -append                                ∂
  134.         -t rsrc                                ∂
  135.         -c RSED                                ∂
  136.         -i "{CIncludes}"                    ∂
  137.         -i "{RIncludes}"                    ∂
  138.         -o {targ}
  139.  
  140. "SCSI Simple Sample Fat" ƒƒ                    ∂
  141.         MakeFile                            ∂
  142.         {Src}SCSISimpleSample.r
  143.     Rez                                        ∂
  144.         {Src}SCSISimpleSample.r                ∂
  145.         -append                                ∂
  146.         -t APPL                                ∂
  147.         -i "{CIncludes}"                    ∂
  148.         -i "{RIncludes}"                    ∂
  149.         -o {targ}
  150.  
  151. "SCSI Simple Sample Fat" ƒƒ                    ∂
  152.         MakeFile                            ∂
  153.         {M68Objects}
  154.     Link                                    ∂
  155.         -t APPL                                ∂
  156.         {M68Objects}                        ∂
  157.         "{Libraries}"Runtime.o                ∂
  158.         "{Libraries}"Interface.o            ∂
  159.         -o {targ}
  160.  
  161. "SCSI Simple Sample Fat" ƒƒ                    ∂
  162.         "{Obj}SCSISimpleSample.xcoff"
  163.     MakePEF                                    ∂
  164.         {deps}                                ∂
  165.         -l InterfaceLib.xcoff=InterfaceLib    ∂
  166.         -l StdCLib.xcoff=StdCLib            ∂
  167.         -o {targ}                            ∂
  168.         -ft APPL -fc '????'
  169.  
  170. "{Obj}SCSISimpleSample.xcoff" ƒ                ∂
  171.         MakeFile                            ∂
  172.         {PPCObjects}
  173.     PPCLink                                    ∂
  174.         {PPCObjects}                        ∂
  175.         "{PPCLibraries}"StdCLib.xcoff        ∂
  176.         "{PPCLibraries}"InterfaceLib.xcoff    ∂
  177.         "{PPCLibraries}"PPCCRuntime.o        ∂
  178.         -main main ∂
  179.         -o {targ}
  180.